Xbasic
INET::FTPDeleteFile Method
Syntax
.DeleteFile as L (TargetFile as C, ServerSidePath as C = "")
Arguments
- TargetFileCharacter
The target file name.
- ServerSidePathCharacter
An optional path for the server side file (this value will be prepended to the TargetFile value if it is provided).
Returns
- resultLogical
Returns .t. if the operation succeed. Otherwise, returns .f.. If an error occurred, the INET::FTP CallResult property will contain more information.
Description
Remove a file from the server.
Example
dim ftp as INET::FTP ftp.UserName = "Fred" ftp.Password = "Secret" ftp.EnableSSL = .t. ftp.Host = "ftp.myserver.com" ftp.UsePassive = .t. if ftp.DeleteFile("target.csv") <> .t. ' error msg = ftp.callResult.error ... end if